#include <iostream>
#include <string>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <vector>
#include <deque>
#include <stack>


namespace mu {

#define VERSION "2.01";
#define COMMANDLIST_SIZE     (256 * 1024)
#define ROOTLIST_SIZE        32
#define CONTAINERSTACK_SIZE  32
#define CLIPSTACK_SIZE       32
#define IDSTACK_SIZE         32
#define LAYOUTSTACK_SIZE     16
#define CONTAINERPOOL_SIZE   48
#define TREENODEPOOL_SIZE    48
#define MAX_WIDTHS           16
#define REAL                 float
#define REAL_FMT             "%.3g"
#define SLIDER_FMT           "%.2f"
#define MAX_FMT              127


enum {
  CLIP_PART = 1,
  CLIP_ALL
};

enum {
  COMMAND_JUMP = 1,
  COMMAND_CLIP,
  COMMAND_RECT,
  COMMAND_TEXT,
  COMMAND_ICON,
  COMMAND_MAX
};

enum {
  COLOR_TEXT,
  COLOR_BORDER,
  COLOR_WINDOWBG,
  COLOR_TITLEBG,
  COLOR_TITLETEXT,
  COLOR_PANELBG,
  COLOR_BUTTON,
  COLOR_BUTTONHOVER,
  COLOR_BUTTONFOCUS,
  COLOR_BASE,
  COLOR_BASEHOVER,
  COLOR_BASEFOCUS,
  COLOR_SCROLLBASE,
  COLOR_SCROLLTHUMB,
  COLOR_MAX
};

enum {
  ICON_CLOSE = 1,
  ICON_CHECK,
  ICON_COLLAPSED,
  ICON_EXPANDED,
  ICON_MAX
};

enum {
  RES_ACTIVE       = (1 << 0),
  RES_SUBMIT       = (1 << 1),
  RES_CHANGE       = (1 << 2)
};

enum {
  OPT_ALIGNCENTER  = (1 << 0),
  OPT_ALIGNRIGHT   = (1 << 1),
  OPT_NOINTERACT   = (1 << 2),
  OPT_NOFRAME      = (1 << 3),
  OPT_NORESIZE     = (1 << 4),
  OPT_NOSCROLL     = (1 << 5),
  OPT_NOCLOSE      = (1 << 6),
  OPT_NOTITLE      = (1 << 7),
  OPT_HOLDFOCUS    = (1 << 8),
  OPT_AUTOSIZE     = (1 << 9),
  OPT_POPUP        = (1 << 10),
  OPT_CLOSED       = (1 << 11),
  OPT_EXPANDED     = (1 << 12)
};

enum {
  MOUSE_LEFT       = (1 << 0),
  MOUSE_RIGHT      = (1 << 1),
  MOUSE_MIDDLE     = (1 << 2)
};

enum {
  KEY_SHIFT        = (1 << 0),
  KEY_CTRL         = (1 << 1),
  KEY_ALT          = (1 << 2),
  KEY_BACKSPACE    = (1 << 3),
  KEY_RETURN       = (1 << 4)
};


// std::stack <
#define unused (x) ((void) (x))
#define expet

struct Context {
    
}


};